import type { RouteRecordRaw } from 'vue-router'
import {adminRoutes} from "@/router/modules/admin";
import {teacherRoutes} from "@/router/modules/teacher";
import {studentRoutes} from "@/router/modules/student";

export const routes: RouteRecordRaw[] = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      layout: false
    }
  },
  {
    path: '/',
    component: () => import('@/layouts/MainLayout.vue'),
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/dashboard/index.vue'),
        meta: {
          title: '首页',
          icon: 'dashboard'
        }
      },
      {
        path: 'profile',
        name: 'Profile',
        component: () => import('@/views/profile/index.vue'),
        meta: {
          title: '个人信息',
          icon: 'user',
          hideInMenu: true
        }
      }
    ]
  },
  ...adminRoutes,...teacherRoutes, ...studentRoutes,
    
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('@/views/error/404.vue'),
    meta: {
      title: '404',
      layout: false
    }
  }
] 